package com.hitqz.robot.api.dispatch.model;

import com.hitqz.robot.api.dispatch.protocol.dto.RobotMapPosDto;

import java.util.LinkedList;
import java.util.List;

/**
 * 下线机器人的任务
 * @author xupkun
 * @date 2024/8/21
 */
public class RobotDispatchDto implements Comparable<RobotDispatchDto> {

    /**
     * 执行的机器人---
     */
    private String clientId;

    /**
     * 当前位置
     */
    private String sourcePosCode;

    /**
     * 直接行路径集合
     */
    private LinkedList<RobotMapPosDto> pathCodes;

    /**
     * 路径可能的距离
     */
    private List<Double> pathDistances;

    /**
     * 目标位置， 一般就是路径集合的最后一个点
     */
    private String targetPosCode;


    private int priority;



    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getSourcePosCode() {
        return sourcePosCode;
    }

    public void setSourcePosCode(String sourcePosCode) {
        this.sourcePosCode = sourcePosCode;
    }

    public LinkedList<RobotMapPosDto> getPathCodes() {
        return pathCodes;
    }

    public void setPathCodes(LinkedList<RobotMapPosDto> pathCodes) {
        this.pathCodes = pathCodes;
    }

    public String getTargetPosCode() {
        return targetPosCode;
    }

    public void setTargetPosCode(String targetPosCode) {
        this.targetPosCode = targetPosCode;
    }

    public List<Double> getPathDistances() {
        return pathDistances;
    }

    public void setPathDistances(List<Double> pathDistances) {
        this.pathDistances = pathDistances;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    @Override
    public int compareTo(RobotDispatchDto o) {
        return Integer.compare(this.priority, o.priority);
    }


}

